﻿@use 'sass:math';
@import "theme-variables.scss";

$html-font-size: 16px;

@function stripUnit($value) {
    @return math.div($value, ($value * 0 + 1));
}

@function em2($pxValue, $base-font-size: $html-font-size) {
    @return #{calc(stripUnit($pxValue) / stripUnit($base-font-size))}em;
}

@function rem2($pxValue) {
    @return #{calc(stripUnit($pxValue) / stripUnit($html-font-size))}rem;
}

@function spacing($spacingValue) {
    @return calc($spacing-scaling-factor * $spacingValue);
}
